package com.google.denta.entity;

/**
 * Person class.
 */
public class Person extends Entity {

    /** Person surname. */
    private String surname;

    /** Person patronymic. */
    private String patronymic;

    /**
     * Default constructor.
     */
    public Person() {
        super();
    }

    /**
     * Default constructor.
     * @param name String
     * @param surname String
     * @param patronymic String
     */
    public Person(final String name, final
            String surname, final String patronymic) {
        super();
        setName(name);
        this.surname = surname;
        this.patronymic = patronymic;
    }

    /**
     * Common getter.
     * @return surname String
     */
    public final String getSurname() {
        return surname;
    }

    /**
     * Common setter.
     * @param surname String
     */
    public final void setSurname(final String surname) {
        this.surname = surname;
    }

    /**
     * Common getter.
     * @return patronymic String
     */
    public final String getPatronymic() {
        return patronymic;
    }

    /**
     * Common setter.
     * @param patronymic String
     */
    public final void setPatronymic(final String patronymic) {
        this.patronymic = patronymic;
    }

    /**
     * Common getter.
     * @return FIO String
     */
    public final String getFio() {
        return getSurname() + " " + getName() + " " + getPatronymic();
    }

    /**
     * toString.
     * @return String
     */
    public final String toString() {
        return "{id:" + getId() + " name:" + getName()
        + " person:" + getSurname() + " patronymic:" + getPatronymic() + "}";
    }
}
